<!DOCTYPE html>
<html lang="<?php echo Yii::app()->language; ?>">
<head>
	<meta name="language" content="<?php echo Yii::app()->language; ?>" />
	<meta charset="utf-8" />
<?php echo BHelper::HtmlHeaderMeta($this); ?>
</head>
<body>
<div class="navbar navbar-fixed-top">
	<div class="navbar-inner navbar-header">
		<div class="container">
			<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
			</a>
			<a class="brand" href="<?php echo Yii::app()->request->baseUrl; ?>">
				<img class="logo" src="<?php echo Yii::app()->request->baseUrl; ?>/img/logo.icon.72.png" />
			</a>
			<div class="nav-collapse">
				<ul class="nav">
					<li class="<?php echo ($this->id=='app')?'active':''; ?>">
						<a href="<?php echo Yii::app()->createUrl('/app'); ?>" class="bottom-line">
							<span class="nav-main-tital">Yamii App</span>
							<span class="nav-sub-tital"><?php echo BUtils::T('yamii_app_msg'); ?></span>
						</a>
					</li>
					<li class="">
						<a href="http://business.yamii.fi" class="bottom-line">
							<span class="nav-main-tital">Yamii for Business</span>
							<span class="nav-sub-tital"><?php echo BUtils::T('yamii_biz_msg'); ?></span>
						</a>
					</li>
					<li class="<?php echo ($this->id=='restaurant')?'active':''; ?>">
						<a href="<?php echo Yii::app()->createUrl('/place'); ?>" class="bottom-line">
							<span class="nav-main-tital"><?php echo BUtils::T('yamii_explore_lbl'); ?></span>
							<span class="nav-sub-tital"><?php echo BUtils::T('yamii_explore_msg'); ?></span>
						</a>
					</li>
				</ul>
				<ul class="nav pull-right small-font user-login">
					<li style="margin-right:5px;">
						<div class="btn-group">
<?php
if (Yii::app()->user->isGuest) {
	echo '<a class="btn" href="'.Yii::app()->createUrl('/accounts/login').'"><i class="icon-signin"></i> '.BUtils::T('login_lbl').'</a>';
} else {
	$url_picture = Yii::app()->user->getState('picture', null);
	if (empty($url_picture)) {
		$picture_html = '<i class="icon-user icon-white"></i> ';
	} else {
		$picture_html = '<img src="'.$url_picture.'" width="20" alt="" /> ';
	}
	echo '<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">'
		. $picture_html . Yii::app()->user->getState('name') .'<span class="caret"></span></a>
		<ul class="dropdown-menu" style="background:#eee;min-width:100px;">
			<li><a style="color:#333;" href="'.Yii::app()->createUrl('/user/profile').'">Profile</a></li>
			<li><a style="color:#333;" href="'.Yii::app()->createUrl('/user/profile#points').'">Points</a></li>
			<li class="divider"></li>
			<li><a style="color:#333;" href="'.Yii::app()->createUrl('/accounts/login').'">'.BUtils::T('logout_lbl').'</a></li>
		</ul>';
}
?>
						</div>
					</li>
					<li>
						<div class="btn-group">
							<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
								<i class="icon-globe blue"></i><span class=""> <?php echo BUtils::T('_LNG_NAME'); ?></span>
								<span class="caret"></span>
							</a>
							<ul class="dropdown-menu" style="background:#eee;min-width:100px;">
								<li><a style="color:#333;" href="<?php echo Yii::app()->createUrl('/accounts/language', array('lang' => 'en_GB')); ?>"> English</a></li>
								<li><a style="color:#333;" href="<?php echo Yii::app()->createUrl('/accounts/language', array('lang' => 'fi_FI')); ?>"> Suomi</a></li>
							</ul>
						</div>
					</li>
				</ul>
			</div><!--/.nav-collapse -->
		</div>
	</div>
</div>

	<div class="container">
		<div class="row">
			<div class="span12">
				<?php if(isset($this->breadcrumbs)):?>
				<div id="breadcrumbs">
					<?php $this->widget('bootstrap.widgets.TbBreadcrumbs', array(
						'links' => $this->breadcrumbs,
						'htmlOptions' => array('class' => 'box_white'),
					)); ?>
				</div>
				<?php endif ?>
			</div>
		</div>
		
		<?php echo $content; ?>
    </div><!-- /container -->
	
<div class="container">
	<div class="row-fluid" id="footer">
		<div class="span9">
			<ul class="clearfix">
				<li><a href="<?php echo Yii::app()->createUrl('/app/about') ?>"><?php echo BUtils::T('about_us_lbl'); ?></a></li>
				<li><a href="<?php echo Yii::app()->createUrl('/app/faq') ?>">FAQ</a></li>
				<li><a href="<?php echo Yii::app()->createUrl('/app/terms') ?>"><?php echo BUtils::T('terms_lbl'); ?></a></li>
				<li><a href="<?php echo Yii::app()->createUrl('/app/privacy') ?>"><?php echo BUtils::T('privacy_lbl'); ?></a></li>
				<li><a href="<?php echo Yii::app()->createUrl('/app/jobs') ?>"><?php echo BUtils::T('jobs_lbl'); ?></a></li>
				<li><a href="<?php echo Yii::app()->createUrl('/mobile') ?>"><?php echo BUtils::T('mobile_lbl'); ?></a></li>
			</ul>
		</div>
		<div class="span3" style="text-align:right;">
			<span class="copyright"><?php echo date('Y'); ?> &copy; LBB Solutions Oy </span>
		</div>
	</div>
</div>
<?php echo BHelper::HtmlScripts(); ?>
<script>(function(){var uv=document.createElement('script');uv.type='text/javascript';uv.async=true;uv.src='//widget.uservoice.com/YjqT7ReRakGOvhoHD9KKQ.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(uv,s)})()</script>
<script>
UserVoice = window.UserVoice || [];
UserVoice.push(['showTab', 'classic_widget', {
  mode: 'full',
  primary_color: '#333333',
  link_color: '#007dbf',
  default_mode: 'feedback',
  forum_id: 218126,
  tab_label: 'Feedback',
  tab_color: '#00abee',
  tab_position: 'bottom-right',
  tab_inverted: false
}]);
</script>
</body>
</html>
